﻿Public Class clsNhaXuatBan
    Public Shared Function Them(ByVal MaNXB As String, ByVal TenNXB As String, ByVal DiaChi As String, ByVal DienThoai As String) As Boolean
        Return db.Query("Insert into NhaXuatBan values ('" & MaNXB & "',N'" & TenNXB & "',N'" & DiaChi & "','" & DienThoai & "')")
    End Function
    Public Shared Function DSNhaXuatBan() As DataTable
        Return db.QueryTable("Select * from NhaXuatBan")
    End Function
    Public Shared Function Xoa(ByVal MaNXB As String) As Boolean
        Return db.Query("delete from NhaXuatBan where MaNXB ='" & MaNXB & "'")
    End Function
    Public Shared Function Sua(ByVal MaNXB As String, ByVal TenNXB As String, ByVal DiaChi As String, ByVal DienThoai As String) As Boolean
        Return db.Query("update NhaXuatBan set TenNXB =N'" + TenNXB + "',DiaChi=N'" + DiaChi + "',DienThoai=N'" + DienThoai + "' where MaNXB ='" + MaNXB + "'")
    End Function
    Public Shared Function TimKiem(ByVal tukhoa As String) As DataTable
        Return db.QueryTable("select * from NhaXuatBan where MaNXB like '%" & tukhoa & "%' or TenNXB like N'%" & tukhoa & "%' or DiaChi like N'%" & tukhoa & "%'or DienThoai like '%" & tukhoa & "%'")
    End Function


End Class
